home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / scsh-0.4 / scsh-0 / scsh-0.4.2 / interfaces.scm < prev    next >
Text File  |  1995-10-13  |  21KB  |  914 lines

  1. ; Copyright (c) 1993, 1994 Richard Kelsey and Jonathan Rees.  See file COPYING.
  2.  
  3.  
  4. ; Some interfaces.  Order of presentation is a bit random.
  5.  
  6. (define-interface scheme-level-0-interface
  7.   (export ((if begin lambda letrec quote set!
  8.            define define-syntax let-syntax letrec-syntax)
  9.        :syntax)
  10.       
  11.       ;; The basic derived expression types.
  12.       ((and cond do let let* or) :syntax)
  13.  
  14.       apply
  15.  
  16.       ;; Scalar primitives
  17.       eq?
  18.       number? integer? rational? real? complex?
  19.       exact? exact->inexact inexact->exact
  20.       + - * / = <
  21.       quotient remainder
  22.       floor numerator denominator
  23.       real-part imag-part
  24.       exp log sin cos tan asin acos atan sqrt
  25.       angle magnitude make-polar make-rectangular
  26.       char?
  27.       char=? char<?
  28.       eof-object?
  29.  
  30.       ;; Data manipulation
  31.       pair? cons car cdr set-car! set-cdr!
  32.       symbol? symbol->string
  33.       string? make-string string-length string-ref string-set!
  34.       vector? make-vector vector-length vector-ref vector-set!
  35.       input-port? output-port?
  36.       read-char peek-char char-ready?
  37.       write-char 
  38.  
  39.       ;; Unnecessarily primitive
  40.       string=?
  41.  
  42.       ;; New in Revised^5 Scheme
  43.       values call-with-values
  44.  
  45.       ;; Things aren't primitive at the VM level, but they have
  46.       ;; to be defined using VM primitives.
  47.       string-copy
  48.       string->symbol
  49.       procedure?
  50.       integer->char char->integer
  51.       close-output-port close-input-port
  52.       open-input-file open-output-file))
  53.  
  54. ; Miscellaneous primitives.
  55.  
  56. (define-interface primitives-interface
  57.   (export close-port            ;extended-ports
  58.       collect            ; ,collect command
  59.       continuation-length
  60.       continuation-ref
  61.       continuation-set!
  62.       continuation?
  63.       extended-number-length
  64.       extended-number-ref
  65.       extended-number-set!
  66.       extended-number?
  67.       external-call
  68.       external-lookup
  69.       external-name
  70.       external-value
  71.       external?
  72.       find-all-xs            ; externals.scm
  73.       force-output            ;ports re-exports this.
  74.       get-dynamic-state        ;fluids
  75.       make-continuation
  76.       make-extended-number
  77.       make-external
  78.       make-record
  79.       make-template
  80.       make-weak-pointer
  81.       memory-status            ;interrupts
  82.       record-length
  83.       record-ref
  84.       record-set!
  85.       record?
  86.       schedule-interrupt        ;interrupts re-exports
  87.       set-dynamic-state!        ;fluids
  88.       set-enabled-interrupts!    ;interrupts
  89.       set-exception-handler!
  90.       set-interrupt-handlers!    ;interrupts
  91.       template-length
  92.       template-ref
  93.       template-set!
  94.       template?
  95.       time                ;interrupts
  96.       unspecific            ;record
  97.       vm-extension
  98.       vm-return
  99.       weak-pointer-ref
  100.       weak-pointer?
  101.       write-string))        ;ports
  102.  
  103. (define-interface bitwise-interface
  104.   (export arithmetic-shift
  105.       bitwise-not bitwise-and bitwise-ior bitwise-xor))
  106.  
  107. (define-interface locations-interface
  108.   (export location?
  109.       location-defined?
  110.       location-id
  111.       set-location-id!
  112.       make-location            ;run.scm ? mini-packages.scm ?
  113.       make-undefined-location    ;defined in base.scm
  114.       set-location-defined?!
  115.       contents
  116.       set-contents!))
  117.  
  118. (define-interface closures-interface
  119.   (export closure?
  120.       make-closure
  121.       closure-env
  122.       closure-template))
  123.  
  124. (define-interface code-vectors-interface
  125.   (export code-vector?
  126.       code-vector-length
  127.       code-vector-ref
  128.       code-vector-set!
  129.       make-code-vector))
  130.  
  131. ; Miscellaneous useful primitives used in various random places.
  132.  
  133. (define-interface features-interface
  134.   (export force-output
  135.       immutable?
  136.       make-immutable!
  137.       string-hash))
  138.  
  139.  
  140. ; Another hodge-podge.
  141.  
  142. (define-interface low-level-interface
  143.   (export vector-unassigned?        ; inspector
  144.       flush-the-symbol-table!    ;build.scm
  145.       maybe-open-input-file        ;mobot system
  146.       maybe-open-output-file))
  147.  
  148. (define-interface vm-exposure-interface
  149.   (export invoke-closure        ;eval
  150.       primitive-catch))        ;shadowing, start, command
  151.  
  152. (define-interface escapes-interface
  153.   (export primitive-cwcc
  154.       with-continuation))
  155.  
  156. (define-interface ascii-interface
  157.   (export ascii->char
  158.       char->ascii
  159.       ascii-limit
  160.       ascii-whitespaces))
  161.  
  162.  
  163. ; Level 1: The rest of Scheme except for I/O.
  164.  
  165. (define-interface scheme-level-1-adds-interface
  166.   (export ((case delay quasiquote syntax-rules) :syntax)
  167.       <= > >=
  168.       abs
  169.       append  assoc assq assv
  170.       boolean?
  171.       caaaar caaadr caadar caaddr caaar caadr caar
  172.       cadaar cadadr caddar cadddr cadar caddr cadr
  173.       cdaaar cdaadr cdadar cdaddr cdaar cdadr cdar
  174.       cddaar cddadr cdddar cddddr cddar cdddr cddr
  175.       char->integer char-alphabetic?
  176.       ceiling
  177.       char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>?
  178.       char-downcase char-lower-case? char-numeric?
  179.       char-upcase
  180.       char-upper-case? char-whitespace? char<=?
  181.       char>=? char>? close-input-port close-output-port
  182.       equal? eqv? even? expt
  183.       for-each force
  184.       gcd
  185.       inexact?
  186.       integer->char
  187.       lcm length list list->string list->vector
  188.       list?                ;New in R4RS
  189.       list-ref list-tail
  190.       map max member memq memv min modulo
  191.       negative? not null?
  192.       odd? open-input-file open-output-file
  193.       positive?
  194.       procedure?            ;from low-level
  195.       rationalize
  196.       reverse
  197.       round 
  198.       string string->list string->symbol
  199.       string-append
  200.       string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>?
  201.       string-copy            ;from low-level
  202.       string-fill!
  203.       string<=? string<? string=? string>=? string>?
  204.       substring
  205.       truncate
  206.       vector vector->list vector-fill!
  207.       zero?))
  208.  
  209. (define-interface scheme-level-1-interface
  210.   (compound-interface scheme-level-1-adds-interface
  211.               scheme-level-0-interface))
  212.  
  213. (define-interface util-interface
  214.   (export any
  215.       every
  216.       filter
  217.       last
  218.       posq
  219.       posv
  220.       position
  221.       reduce
  222.       sublist
  223.       insert
  224.       unspecific))
  225.  
  226. ; Level 2 consists of harder things built on level 1.
  227.  
  228. (define-interface records-interface
  229.   (export make-record-type
  230.       record-constructor
  231.       record-accessor
  232.       record-modifier
  233.       record-predicate
  234.       define-record-discloser
  235.       record-type?
  236.       record-type-field-names
  237.       record-type-name))
  238.  
  239. (define-interface records-internal-interface
  240.   (export record?
  241.       record-type
  242.       record-length
  243.       record-ref
  244.       record-set!
  245.       :record-type
  246.       disclose-record))
  247.  
  248. (define-interface define-record-types-interface
  249.   (export (define-record-type :syntax)
  250.       define-record-discloser))
  251.  
  252. (define-interface methods-interface
  253.   (export (define-generic :syntax)
  254.       (define-method :syntax)
  255.       (define-simple-type :syntax)
  256.       :values
  257.       :value
  258.       :number
  259.       :complex
  260.       :real
  261.       :rational
  262.       :integer
  263.       :exact-integer
  264.       :boolean
  265.       :symbol
  266.       :char
  267.       :null
  268.       :pair
  269.       :vector
  270.       :string
  271.       :procedure
  272.       :input-port
  273.       :output-port
  274.       :eof-object
  275.       :record
  276.       :record-type
  277.       :zero
  278.       singleton
  279.       disclose &disclose))
  280.  
  281. (define-interface meta-methods-interface
  282.   (export type-predicate &type-predicate
  283.       type-priority  &type-priority
  284.       type-superiors &type-superiors
  285.       same-type?     &same-type?
  286.       add-method!     &add-method!
  287.       set-final-method!
  288.       make-method-table         ;rts/exception.scm
  289.       method-table-get-perform  ;rts/exception.scm
  290.       make-simple-type
  291.       ;; Hooks for DOODL or other future extension
  292.       :simple-type :method-info :method-table :singleton
  293.       make-generic
  294.       (method-info :syntax)
  295.       methods->perform))
  296.  
  297. (define-interface number-i/o-interface
  298.   (export number->string &number->string
  299.       string->number
  300.       really-string->number &really-string->number ;exactness argument
  301.       string->integer))
  302.  
  303.  
  304. (define-interface fluids-interface
  305.   (export make-fluid
  306.       let-fluid
  307.       let-fluids
  308.       fluid
  309.       set-fluid!))
  310.  
  311. (define-interface fluids-internal-interface
  312.   (export initialize-dynamic-state!
  313.       current-thread
  314.       set-current-thread!
  315.       get-dynamic-env        ;thread.scm
  316.       set-dynamic-env!        ;wind.scm
  317.       fluid-lookup))        ;wind.scm
  318.  
  319. (define-interface enumerated-interface
  320.   (export (define-enumeration :syntax)
  321.       (enum :syntax)
  322.       (enumerand->name :syntax)
  323.       (name->enumerand :syntax)))
  324.  
  325. (define :enumeration :syntax)
  326.  
  327. (define-interface signals-interface
  328.   (export error warn syntax-error call-error
  329.       signal signal-condition
  330.       make-condition))
  331.  
  332. (define-interface handle-interface
  333.   (export ignore-errors with-handler))
  334.  
  335. (define-interface conditions-interface
  336.   (export define-condition-type
  337.       condition-predicate
  338.       condition-stuff condition-type
  339.       error? warning? syntax-error? call-error? read-error?
  340.       interrupt?
  341.  
  342.       ;; Do these belong here?... not really.
  343.       exception-arguments
  344.       exception-opcode
  345.       exception?
  346.       make-exception))
  347.  
  348. (define-interface wind-interface
  349.   (export call-with-current-continuation
  350.       dynamic-wind))
  351.  
  352. (define-interface ports-interface
  353.   (export call-with-input-file call-with-output-file
  354.       current-input-port current-output-port
  355.       with-input-from-file with-output-to-file
  356.       newline
  357.       input-port-option        ;read.scm
  358.       output-port-option        ;write.scm
  359.       write-string            ;write.scm
  360.       with-initial-ports        ;init.scm
  361.       error-output-port
  362.       force-output            ;xport.scm
  363.       input-port?
  364.       ;;;more exports added for scsh -dalbertz
  365.       $current-input-port
  366.       $current-output-port
  367.       $error-output-port
  368.       ;;;end of additions
  369.       output-port?))
  370.  
  371. (define-interface exceptions-interface
  372.   (export define-exception-handler
  373.       initialize-exceptions!
  374.       make-opcode-generic!
  375.       signal-exception
  376.       continuation-preview        ;env/debug.scm
  377.       really-signal-condition))    ;rts/xprim.scm
  378.  
  379. (define-interface interrupts-interface
  380.   (export initialize-interrupts!    ;init.scm
  381.       interrupt-handlers        ;thread.scm
  382.       interrupt?
  383.       set-enabled-interrupts!    ;command.scm
  384.       enabled-interrupts
  385.       one-second
  386.       all-interrupts
  387.       with-interrupts-allowed
  388.       with-interrupts-inhibited
  389.       interrupt-before-heap-overflow!
  390.       schedule-interrupt
  391.       interrupt
  392.       (enum :syntax)))
  393.  
  394. (define-interface writing-interface
  395.   (export write
  396.       display
  397.       display-type-name
  398.       recurring-write))
  399.  
  400. (define-interface reading-interface
  401.   (export read
  402.       define-sharp-macro        ;command.scm
  403.       reading-error
  404.       gobble-line
  405.       ;;; added for scsh for dalbertz by bdc
  406.       preferred-case
  407.       parse-token
  408.       set-standard-read-macro!
  409.       set-standard-syntax!
  410.       dot
  411.       sub-read-token
  412.       ))
  413.  
  414. ; Level 2: the harder stuff.
  415. ; Various primitives get promoted to n-ary at this point.
  416.  
  417. (define-interface scheme-level-2-adds-interface
  418.   (export ((+ - * /)     (proc (&rest :number) :number))
  419.       ((< = > <= >=) (proc (&rest :number) :boolean))
  420.       (make-vector     (proc (:exact-integer &opt :value) :vector))
  421.       (make-string     (proc (:exact-integer &opt :char) :string))
  422.       ((write-char)  (proc (:char &opt :output-port) :unspecific))
  423.       ((read-char peek-char char-ready?)
  424.        (proc (&opt :input-port) :value))
  425.       call-with-current-continuation
  426.       call-with-input-file call-with-output-file
  427.       current-input-port current-output-port
  428.       dynamic-wind            ;New in R5RS
  429.       with-input-from-file with-output-to-file
  430.       number->string string->number
  431.       newline display write
  432.       read))
  433.  
  434. (define-interface scheme-level-2-interface
  435.   (compound-interface scheme-level-2-adds-interface
  436.               scheme-level-1-interface))
  437.  
  438. (define-interface scheme-adds-interface
  439.   (export eval load
  440.       interaction-environment
  441.       scheme-report-environment))
  442.  
  443. (define-interface scheme-interface
  444.   (compound-interface scheme-adds-interface
  445.               scheme-level-2-interface))
  446.  
  447.  
  448. ; Stuff that comes for free with level 2.
  449.  
  450. (define-interface scheme-level-2-internal-interface
  451.   (export usual-resumer))
  452.  
  453. (define-interface continuations-interface
  454.   (export continuation-arg
  455.       continuation-arg-count
  456.       continuation-cont
  457.       continuation-env
  458.       continuation-overhead        ;foo
  459.       continuation-pc
  460.       continuation-template
  461.       continuation-parent
  462.       continuation?
  463.       :continuation))
  464.  
  465. (define-interface templates-interface
  466.   (export make-template
  467.       template-code
  468.       template-info
  469.       template-length
  470.       template-ref
  471.       template-overhead
  472.       set-template-code!
  473.       set-template-info!
  474.       template-set!
  475.       template?))
  476.  
  477. (define-interface weak-interface
  478.   (export weak-pointer?            ;disclosers.scm
  479.       weak-pointer-ref
  480.       make-weak-pointer
  481.       make-population
  482.       add-to-population!
  483.       population->list
  484.       walk-population))
  485.  
  486. (define-interface filenames-interface
  487.   (export namestring *scheme-file-type* *load-file-type*
  488.       file-name-directory
  489.       file-name-nondirectory
  490.       translate
  491.       set-translation!
  492.       translations))
  493.  
  494.  
  495. ; Things for the compiler.
  496.  
  497. (define-interface general-tables-interface
  498.   (export make-table
  499.       make-string-table
  500.       make-symbol-table
  501.       make-integer-table
  502.       make-table-maker
  503.       table?
  504.       table-ref
  505.       table-set!
  506.       table-walk
  507.       make-table-immutable!))
  508.  
  509. (define-interface usual-macros-interface
  510.   (export usual-transform))
  511.  
  512. (define-interface meta-types-interface
  513.   (export same-type?
  514.       subtype?
  515.       meet?
  516.       join-type
  517.       meet-type
  518.       sexp->type type->sexp rail-type->sexp
  519.       syntax-type
  520.       any-values-type
  521.       any-arguments-type
  522.       value-type
  523.       error-type
  524.  
  525.       make-some-values-type
  526.  
  527.       empty-rail-type
  528.       rail-type
  529.       make-optional-type
  530.       make-rest-type
  531.       empty-rail-type?
  532.       rest-type?
  533.       head-type
  534.       tail-type
  535.  
  536.       procedure-type
  537.       procedure-type-domain
  538.       procedure-type-codomain
  539.       restrictive?
  540.       procedure-type?
  541.       fixed-arity-procedure-type?
  542.       procedure-type-argument-types
  543.       procedure-type-arity
  544.       any-procedure-type
  545.       (proc :syntax)
  546.       (some-values :syntax)
  547.  
  548.       boolean-type
  549.       char-type
  550.       null-type
  551.       unspecific-type
  552.  
  553.       exact-integer-type
  554.       integer-type
  555.       rational-type
  556.       real-type
  557.       complex-type
  558.       number-type
  559.       exact-type
  560.       inexact-type
  561.  
  562.       pair-type
  563.       string-type
  564.       symbol-type
  565.       vector-type
  566.  
  567.       escape-type
  568.       structure-type))
  569.  
  570. (define-interface syntactic-interface
  571.   (export binding?
  572.       binding-place
  573.       clobber-binding!
  574.       binding-static
  575.       binding-type
  576.       make-binding
  577.       desyntaxify
  578.       forget-integration
  579.       impose-type
  580.       literal?
  581.       generate-name            ;package.scm, for accesses
  582.       generated-env
  583.       generated-parent-name
  584.       generated-symbol
  585.       generated?
  586.       get-operator
  587.       make-qualified
  588.       make-operator-table
  589.       make-transform
  590.       maybe-transform-call
  591.       n-ary?
  592.       name->qualified
  593.       name->symbol
  594.       name-hash            ;package.scm
  595.       name?                ;assem.scm
  596.       normalize-formals
  597.       number-of-required-args
  598.       operator-name
  599.       operator-table-ref
  600.       operator-define!
  601.       operator-lookup
  602.       operator-type
  603.       operator-uid
  604.       operator?
  605.       operators-table        ;config.scm
  606.       process-syntax
  607.       qualified?
  608.       qualified-parent-name
  609.       qualified-symbol
  610.       set-binding-place!
  611.       same-denotation?        ;for redefinition messages
  612.       syntax?
  613.       transform-env transform-aux-names ;link/reify.scm
  614.       transform-source transform-id   ;link/reify.scm
  615.       transform-type
  616.       transform?
  617.       unbound?
  618.       schemify
  619.       get-funny
  620.       reflective-tower 
  621.       funny-name/reflective-tower
  622.       ;; Stuff moved from meta-types
  623.       variable-type
  624.       variable-type?
  625.       variable-value-type
  626.       usual-variable-type
  627.       compatible-types?
  628.       undeclared-type
  629.       bind-source-file-name
  630.       funny-name/reader
  631.       environment-reader))
  632.  
  633. (define-interface nodes-interface
  634.   (export classify
  635.       make-node
  636.       ;; name-node-binding
  637.       node?
  638.       node-operator
  639.       node-operator-id
  640.       node-form
  641.       node-ref
  642.       node-set!
  643.       node-predicate
  644.       make-similar-node
  645.       define-node?  
  646.       define-syntax-node?
  647.       scan-body
  648.       lookup
  649.       bind
  650.       bind1))
  651.  
  652.  
  653. ; Interfaces.
  654.  
  655. (define-interface interfaces-interface
  656.   (export make-compound-interface
  657.       make-simple-interface
  658.       note-reference-to-interface!
  659.       interface-ref
  660.       interface?
  661.       interface-clients
  662.       for-each-declaration
  663.       note-interface-name!))
  664.  
  665.  
  666. ; Packages.
  667.  
  668. (define-interface packages-interface
  669.   (export make-package
  670.       make-simple-package        ;start.scm
  671.       make-structure
  672.       package-define!
  673.       package-lookup
  674.       package?            ;command.scm
  675.       structure-lookup        ;env.scm
  676.       generic-lookup        ;inline.scm
  677.       structure-interface        ;config.scm
  678.       package->environment
  679.       structure?
  680.       package-uid            ;reifier
  681.       make-new-location        ;ctop.scm
  682.       package-note-caching
  683.       structure-package
  684.       extract-package-from-environment
  685.       package-define-funny!
  686.       note-structure-name!
  687.       (:package :type)
  688.       (:structure :type)))        ;for (define-method ...)'s
  689.  
  690. (define-interface packages-internal-interface
  691.   (export package-loaded?        ;env/load-package.scm
  692.       set-package-loaded?!        ;env/load-package.scm
  693.       package-name
  694.       flush-location-names
  695.       package-name-table        ;debuginfo
  696.       location-info-table        ;debuginfo, disclosers
  697.       package-unstable?        ;env/pacman.scm
  698.       package-integrate?        ;env/debug.scm
  699.       package-get
  700.       package-put!
  701.  
  702.       ;; For scanner
  703.       for-each-export
  704.       package-accesses
  705.       package-clauses
  706.       package-file-name
  707.       package-opens
  708.       set-package-integrate?!
  709.       structure-name
  710.  
  711.       ;; For package mutation
  712.       for-each-definition
  713.       set-package-opens!
  714.       set-structure-interface!
  715.       set-package-opens-thunk!
  716.       structure-clients
  717.       package-opens-thunk
  718.       package-opens-really
  719.       structure-interface-really
  720.       make-new-location
  721.       $get-location
  722.       set-package-get-location!
  723.       initialize-structure!
  724.       initialize-package!
  725.  
  726.       extract-package-from-environment ;foo
  727.       package-cached
  728.       package-definitions
  729.       package-clients))
  730.  
  731. (define-interface scan-interface
  732.   (export scan-forms
  733.       scan-file
  734.       really-scan-file
  735.       scan-structures        ;load-package.scm, link/link.scm
  736.       really-scan-structures
  737.       scan-package
  738.       set-optimizer!
  739.       $note-file-package
  740.       noting-undefined-variables
  741.       really-noting-undefined-variables
  742.       $note-undefined        ;env/command.scm
  743.       note-undefined!
  744.       check-structure))
  745.  
  746. (define-interface segments-interface
  747.   (export attach-label
  748.       byte-limit
  749.       empty-segment
  750.       instruction
  751.       instruction-using-label
  752.       instruction-with-literal
  753.       instruction-with-location
  754.       instruction-with-template
  755.       make-label
  756.       note-environment
  757.       note-source-code
  758.       segment->template
  759.       segment-size
  760.       sequentially))
  761.  
  762. (define-interface compiler-interface
  763.   (export compile
  764.       compile-and-run-file        ;for LOAD
  765.       compile-and-run-forms        ;for EVAL
  766.       compile-and-run-scanned-forms ;for eval.scm / ensure-loaded
  767.       compile-file            ;link/link.scm
  768.       compile-form            ;link/link.scm
  769.       compile-scanned-forms        ;link/link.scm
  770.       make-startup-procedure    ;link/link.scm
  771.       package-undefineds        ; env/pedit.scm
  772.       package-undefined-but-assigneds
  773.       location-for-reference
  774.       set-type-check?!        ; for timings
  775.       define-compilator        ;assem.scm
  776.       deliver-value            ;assem.scm
  777.       get-location            ;assem.scm
  778.       environment-level        ;assem.scm
  779.       bind-vars            ;assem.scm
  780.       ))
  781.  
  782. (define-interface debug-data-interface
  783.   (export debug-data-env-maps
  784.       debug-data-name
  785.       debug-data-names
  786.       debug-data-parent
  787.       debug-data-pc-in-parent
  788.       debug-data-source
  789.       debug-data-table
  790.       debug-data-uid
  791.       debug-data?
  792.       get-debug-data
  793.       make-debug-data
  794.       template-debug-data
  795.       template-id
  796.       template-name
  797.       template-names
  798.  
  799.       debug-flag-names
  800.       debug-flag-accessor
  801.       debug-flag-modifier
  802.       with-fresh-compiler-state))  ;for linker
  803.  
  804. (define-interface evaluation-interface
  805.   (export eval load load-into load-quietly eval-from-file
  806.       eval-scanned-forms really-eval-scanned-forms))
  807.  
  808. (define-interface environments-interface  ;cheesy
  809.   (export *structure-ref
  810.       environment-define!
  811.       environment-ref
  812.       environment-set!
  813.       interaction-environment
  814.       make-reflective-tower
  815.       scheme-report-environment
  816.       set-interaction-environment!
  817.       set-scheme-report-environment!
  818.       with-interaction-environment
  819.       set-reflective-tower-maker!))
  820.  
  821. (define-interface defpackage-interface
  822.   (export ((def                    ;Formerly define-structure
  823.         define-interface        ;Formerly define-signature
  824.         define-structures        ;Formerly define-package
  825.         define-structure
  826.         define-module
  827.         define-syntax
  828.         define-reflective-tower-maker
  829.         export-reflective-tower-maker
  830.         compound-interface
  831.         export
  832.         structure structures let    ; New
  833.         begin            ; mostly for macros
  834.         define            ; for compatibility?
  835.         a-package)            ; cf. env/init-defpackage.scm
  836.        :syntax)
  837.       values
  838.       interface-of
  839.       set-verify-later!))
  840.  
  841. (define-interface types-interface
  842.   (export ((:syntax :values :arguments :value) :type)
  843.       (procedure (proc (:type :type) :type))  ; (procedure T1 T2)
  844.       (proc :syntax)        ; (proc (T1 ... Tn) T)
  845.       (some-values :syntax)        ; (some-values T1 ... Tn)
  846.       ((:boolean
  847.         :char
  848.         :number
  849.         :complex :real :rational :integer :exact-integer
  850.         :null
  851.         :unspecific
  852.         :pair
  853.         :string
  854.         :symbol
  855.         :vector
  856.         :procedure
  857.         :input-port :output-port
  858.         :error
  859.         :escape)
  860.        :type)
  861.       (:structure :type)
  862.       :type))        ;Holy stratification, Batman!
  863.  
  864.  
  865. ; VM architecture
  866.  
  867. (define-interface architecture-interface
  868.   (export (enum :syntax)  ;So you don't have to remember to open ENUMERATED
  869.       (enumerand->name :syntax)
  870.       (name->enumerand :syntax)
  871.       bits-used-per-byte
  872.       (interrupt :enumeration)
  873.       interrupt-count
  874.       (memory-status-option :enumeration)
  875.       memory-status-option-count
  876.       (op :enumeration)
  877.       op-count
  878.       opcode-arg-specs
  879.       (stob :enumeration)
  880.       stob-count
  881.       stob-data
  882.       (time-option :enumeration)
  883.       time-option-count))
  884.  
  885. (define-interface display-conditions-interface
  886.   (export display-condition        ;command.scm
  887.       &disclose-condition          ;env/disclosers.scm
  888.       limited-write))
  889.  
  890.  
  891. (define-interface inline-interface
  892.   (export inline-transform
  893.       ;; name->qualified qualified?
  894.       qualified->name
  895.       substitute))
  896.  
  897. ; Bindings needed by the form composed by REIFY-STRUCTURES.
  898.  
  899. (define-interface for-reification-interface
  900.   (export operator
  901.       simple-interface
  902.       package
  903.       transform
  904.       ;; From usual-macros
  905.       usual-transform
  906.       ;; From inline
  907.       inline-transform
  908.       ;; From packages
  909.       package-define!
  910.       make-structure
  911.       ))
  912.  
  913. ;(define-interface command-interface ...)  -- moved to more-interfaces.scm
  914.